<template>
  <div>
    <div class="hot-header">热门景点</div>
    <ul>
      <router-link tag="li"
                   :to="'/detail/'+item.id"
                   class="item border-bottom"
                   v-for="item of list"
                   :key="item.id">
        <img class="img"
             :src="item.imgUrl"
             alt="">
        <div class="info">
          <div class="title">{{item.title}}</div>
          <div class="desc">{{item.desc}}</div>
          <button class="btn">查看详情</button>
        </div>
      </router-link>
    </ul>
  </div>
</template>
<script>
export default {
  name: 'HomeRecommend',
  props: {
    list: Array
  }
}
</script>
<style lang="stylus" scoped>
@import '~styles/mixins.styl'
.hot-header
  height: 0.8rem
  line-height: 0.8rem
  text-indent: 0.2rem
  background: #ccc
.item
  display: flex
  height: 1.9rem
  overflow: hidden
  .img
    width: 1.7rem
    height: 1.7rem
    padding: 0.1rem
  .info
    flex: 1
    padding: 0.1rem
    min-width: 0
    .title
      line-height: 0.54rem
      font-size: 0.32rem
      ellipsis()
    .desc
      line-height: 0.4rem
      color: #ccc
      ellipsis()
    .btn
      background: #ff9300
      padding: 0.01rem
      border-radius: 0.06rem
      margin-top: 0.2rem
      color: #fff
</style>
